<div id="data_page" class="in_page">
	<div class="panel panel-default">
  <div class="panel-body">
   <form class="form-inline" action="{:U('Sc/index')}" method="get">
   	 
	
			 <div class="form-group" >
  	<a href="{:U('Sc/addsc')}?id={$id}"><button type="button" class="btn btn-sm btn-primary ">添加</button></a>  
  	<a href="{:U('City/area')}?id={$cid}"><button type="button" class="btn btn-sm btn-primary ">返回</button></a>  
   	</div>
</form>



  
  </div>

</div>
      <table class="table table-bordered">
        <thead>
          <tr>
            <th><span class="glyphicon glyphicon-gift"></span>#</th>
          
            <th><span class="glyphicon glyphicon-fire"></span>服务中心</th>
         	<th><span class="glyphicon glyphicon-fire"></span>项目数</th>
            <th><span class="glyphicon glyphicon-calendar"></span>操作</th>
          </tr>
        </thead>
        <tbody>
          
      <volist name="list" id="data"  key="$key" >     
		  <tr>
            <th scope="row">{$key+1}</th>
           
            <th>{$data.sc}</th>   
             <th>{$data.num}</th>    
            <th>
			
				 <a <if condition="$data.num eq 0">href="{:U('Sc/delsc')}?id={$data.id}&aid={$data.aid}"</if> <if condition="$data.num neq 0"> href="javascript:void(0);" onclick="yz()" </if>> <button type="button" class="btn btn-danger btn-xs">删除</button></a>  
  			</th>
          </tr>
          
     </volist>        
          
        </tbody>
      </table> 
	<style>
 .pagelist{ text-align:right;  padding:7px 0;}
 .pagelist a{ margin:0 5px; border:#6185a2 solid 1px; display:inline-block; padding:2px 6px 1px; line-height:16px; background:#fff; color:#6185a2; text-decoration: none;}
 .pagelist span{ margin:0 5px; border:#6185a2 solid 1px; display:inline-block; padding:2px 6px 1px; line-height:16px; color:#6185a2; color:#fff; background:#6185a2;}
 .chkb { margin:0px 10px; }
 .chkb label{ line-height:24px; padding:4px 10px; font-weight:100; }
</style>
<script>
	function yz(){
		
		alert("该服务中心还有项目！禁止删除")
	}
	
</script>


	<nav> 
		<div class="pagelist">
		    {$page}
		</div>
	</nav>

